# -*- coding: utf-8 -*-
"""
作者: 肖麒
联系方式：QQ：1505448035
时间: 2025/4/24 15:34
文件作用：
"""
from curl_cffi import requests
import json


class QueryApi:
    def __init__(self):
        pass

    def get_query(self):
        headers = {
            # "Host": "lv-pc-api-sinfonlinea.ulikecam.com",
            # "app-sdk-version": "48.0.0",
            # "content-type": "application/json",
            # "appid": "3704",
            # "appvr": "8.6.0",
            # "device-time": "1755324250",
            # "lan": "zh-hans",
            # "loc": "cn",
            # "pf": "4",
            # # "sign": "327fb318a2d5082af173446fb42430b5",
            # "sign-ver": "1",
            # "tdid": "4012556021711092",
            # "x-ss-stub": "2a4a09dee08897205bc59828f86627ba",
            # "x-ss-dp": "3704",
            # "x-tt-trace-id": "00-b17a7a0a0de41660050c0f47abae0e78-b17a7a0a0de4166001",
            # "user-agent": "Cronet/TTNetVersion:fc5bce71 2024-12-31 QuicVersion:55af8b7a 2024-11-18",
            # "x-helios": "OU0AABbzFUhbPl/Wthbylx7YsVHAr6vQ7uFfzrOstEgq2meX",
            # "x-medusa": "fB+gaIj3/5KoyHxTqTVoGCjQwXCYfAMBD7i+BWCAEeM8meo/9+2HjuO1OxiJt6Xuz5Z4p2hTayDuj53MBU2N8ywvLe3rv9s51Uw+bQ86C2IihlgSD25VAhW1GhrxGMzq2+NNu0TvYuHg7wSH1UgjwQVHmPKY7/OQHvyaFF5/2zwND7W4wwG0pAHUkMzGUTpvuz7a7I+nA4ndciSuZJbY/1iH74Kees3FN9mRKmUur0ua9U2P2NyVMUZNJLYxHj97La++E43HrdGtR3wyrWdkB/P54waxKkhSTEc9kqh6Z4/JqZGIZAw9w0RzFBIVFNnrQuEFslPVlKMUh/rARLX/evLRZTqHjS1oFeyLcIF3WE2tTun1YVeMjy6LXOFlBF4o8ejzJbvAT9xm/CiHOlLkKKJ+4HPf7GXHdX6IWZQfQDnt4c8z2kz1tEk/E6ZaI7ChCWlSYJx+v6MimKvSejJA55kLpBqmH27iBw4vta2zK9UkAbj6D4M35TfCgHm4dxBzy44s2Uf0flRukFPaUCYBFqzns2SghJn+Tr4129B/17f2tJi+xbeY/PWQ2S2L6kElG8fFKGlYO7UO4aPPCMLNWEiyc2VVSuGKrQ4OXicJT3YYiFs8Ya2mHH2/fIwwd81aGo7Q4oAv6x/KwYvtipHtsl0qYEVoRVjqRMZKmQdI9cqefKnHgoisXcLPSfnjZxX2xS9qQ5zhjMoB/3X/tG0eswDr6ohlz6Dg/CJ7H6/frwcPp8lfz/uJJ91otPuRZmhaMiJSji9xGS9ge1fjzxTX2CsnH/fbt6YOxG2ZhO/uDgBenaubSnr9Tj5Lu6frn2hES12ZvTfHyVdn/tC4bydlAeWjnGq1kAcoHuX7/9+///f+/wAA"
        }
        url = "https://lv-pc-api-sinfonlinea.ulikecam.com/lv/v1/audio_subtitle/query"
        params = {
            "aid": "3704",
            "device_brand": "American Megatrends International, LLC.",
            # "device_id": "4012556021711092",
            # "iid": "3045002399793178",
            "app_name": "JianyingPro",
            "os_version": "10.0.26100",
            "channel": "jianyingpro_0",
            "device_type": "",
            "device_platform": "windows",
            "version_code": "8.6.0",
            "version_name": "8.6.0"
        }
        data = {
            # submitapi 返回的
            "id": "cache:0d9f569410cd6c97bd2aff7ce041aab4:82520a1b-5f9a-479a-8448-1529a35cbfce:false:0:[wordsPerLine]16",
            "pack_options": {
                "need_attribute": True
            }
        }
        data = json.dumps(data, separators=(',', ':'))
        response = requests.post(url, headers=headers, params=params, data=data)

        json_data = response.json()
        return json_data


if __name__ == '__main__':
    query_api = QueryApi()
    json_data = query_api.get_query()
    data = json_data.get('data')
    print(data)
